@import "header.html"
<link rel="stylesheet" href="../css/indent.css">
<link rel="stylesheet" href="../css/landlord_manage_house.css">
<body>
<header class="fxj-header">
    <span id="backable" class="back" onclick="fxj.closeWin()">
        <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-jiantou"></use>
        </svg>
    </span>
    <h1 class="fxj-title">房源管理</h1>
</header>

<main id="main">
    <div class="tab-bar">
        <span :class="{active:!view.end}" @click="toggleEnd(false)">已上线</span>
        <span :class="{active:view.end}" @click="toggleEnd(true)">未上线</span>
    </div>

    <div class="tabs">

        <div id="underway" v-show="!view.end">
            <ul class="indent-group">
                <li class="indent-item" v-for="house of data.going">
                    <div class="indent-title">
                        <span class="title" v-text="'ID:'+house.id"></span>
                        <span class="title" v-text="'发布日期:'+house.date"></span>
                        <span class="highlight" v-text="house.publish"></span>
                    </div>
                    <i class="tieku"></i>
                    <div class="indent-info" @click="goPage('house_res_detail.html',{
                        data:{
                            id:house.id
                        }
                    })">
                        <img :src="fixImgUrl(house.img)" alt="加载失败">
                        <div style="text-align: center">

                            <p class="house-title" v-text="house.title"></p>
                            <p v-cloak>
                                <span>
                                    <svg class="icon position" aria-hidden="true">
                                        <use xlink:href="#icon-location-c-o"></use>
                                    </svg>
                                </span>
                                {{house.city_name}}{{house.district_name}}
                            </p>
                            <p v-cloak><span v-text="house.lease_type"></span>-<span v-text="house.bedroom+'室'+house.hall+'厅'"></span>
                            </p>
                            <div class="btns">
                                <!--<div class="apply-for" @click="applyForTakePhoto(event,'申请',house.id)">申请实拍</div>
                                <div class="apply-for" @click="applyForTakePhoto(event,'进度',house.id)">实拍进度</div>-->
                                <!--<div class="auth" @click="authTrade(event)">商旅认证</div>-->
                                <!--<div class="apply-for-mo">
                                    <svg class="icon">
                                        <use xlink:href="#icon-xiangji1"></use>
                                    </svg>
                                    已实拍
                                </div>-->
                                <!--<div class="auth-mo">
                                    <svg class="icon">
                                        <use xlink:href="#icon-gongwenbao"></use>
                                    </svg>
                                    已认证商旅
                                </div>-->
                            </div>
                        </div>
                        <svg class="icon">
                            <use xlink:href="#icon-you"></use>
                        </svg>
                    </div>
                    <i class="tieku"></i>
                    <div class="btn-group online">
                        <span class="highlight" @click="offlineHouse(house.id)">下线房源</span>
                        <span class="highlight" @click="goMenu(house.id)">修改信息</span>
                        <span class="highlight" @click="goPage('room_state_prices.html',{
                            data:{
                                houseId:house.id,
                            }
                        })">房态价格</span>
                    </div>
                </li>
            </ul>
        </div>

        <div id="end" v-show="view.end">
            <ul class="indent-group">
                <li class="indent-item" v-for="house of data.end">
                    <div class="indent-title">
                        <span class="title" v-text="'ID:'+house.id"></span>
                        <span class="title" v-text="'发布日期:'+house.date"></span>
                        <span class="highlight" v-text="house.publish"></span>
                    </div>
                    <i class="tieku"></i>
                    <div class="indent-info" @click="goPage('house_res_detail.html',{
                        data:{
                            id:house.id
                        }
                    })">
                        <img :src="fixImgUrl(house.img)" alt="未添加">
                        <div style="text-align: center">
                            <p class="house-title" v-text="house.title"></p>
                            <p v-cloak>
                                <span>
                                    <svg class="icon position" aria-hidden="true">
                                        <use xlink:href="#icon-location-c-o"></use>
                                    </svg>
                                </span>
                                {{house.city_name}}{{house.district_name}}
                            </p>
                            <p v-cloak><span>{{house.lease_type}}</span>-<span>{{house.bedroom}}室{{house.hall}}厅</span></p>
                            <div class="btns">
                                <!--<div class="apply-for" @click="applyForTakePhoto(event,'申请',house.id)">申请实拍</div>-->
                                <!--<div class="apply-for" @click="applyForTakePhoto(event,'进度',house.id)">实拍进度</div>-->
                                <!--<div class="auth" @click="authTrade(event)">商旅认证</div>-->
                                <!--<div class="apply-for-mo">
                                    <svg class="icon">
                                        <use xlink:href="#icon-xiangji1"></use>
                                    </svg>
                                    已实拍
                                </div>
                                <div class="auth-mo">
                                    <svg class="icon">
                                        <use xlink:href="#icon-gongwenbao"></use>
                                    </svg>
                                    已认证商旅
                                </div>-->
                            </div>
                        </div>
                        <svg class="icon">
                            <use xlink:href="#icon-you"></use>
                        </svg>
                    </div>
                    <i class="tieku"></i>
                    <div class="btn-group">
                        <span class="highlight" @click="deleteHouse(house.id)">删除房源</span>
                        <span class="highlight" @click="goMenu(house.id)">修改信息</span>
                        <span class="highlight" v-if="house.publish==='下架'" @click="onlineHouse(house.id)">上线房源</span>
                        <span v-if="house.publish!=='待审核'" class="highlight" @click="goPage('room_state_prices.html',{
                            data:{
                                houseId:house.id,
                            }
                        })">房态价格</span>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div id="loadMore"></div>
</main>

@import "js.html"
<script src="../script/landlord_manage_house.js"></script>
</body>
@import "footer.html"
